{extend name="admin/public:layout" /}
{block name="title"}主题管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> 主题列表</li>
            </ol>
        </div>
        <div class="ibox-content">
            <div class="toolbar">
                <div class="pull-right">
                    <form class="form-inline" method="post">
                        <div class="form-group">
                            <div class="input-group">
                                <input class="form-control" name="theme_name" value="" type="text" placeholder="检索关键词">
                            </div>
                        </div>
                        <button type="submit" class="btn btn-info">
                            <i class="fa fa-search"></i> 搜索
                        </button>
                    </form>
                </div>
                <div class="clearfix"></div>
            </div>
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th width="50">#</th>
                    <th>所在圈子</th>
                    <th>主题名称</th>
                    <th>点赞数量</th>
                    <th>评论数量</th>
                    <th>置顶</th>
                    <th>推荐</th>
                    <th>状态</th>
                    <th width="80">操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="vo"}
                <tr>
                    <td>{$vo.theme_id}</td>
                    <td>{$vo.circle_name}</td>
                    <td>{$vo.theme_name}</td>
                    <td>{$vo.theme_likecount}</td>
                    <td>{$vo.theme_commentcount}</td>
                    <td>
                        {eq name="vo.is_top" value="1"}
                        <a href="javascript:;" onclick="doAction(this);"
                           data-msg="确认取消置顶吗？" data-url="{:url('setField')}" data-params="field=is_top&value=0&theme_id={$vo.theme_id}">
                            <i class="fa fa-check"> </i>
                        </a>
                        {else/}
                        <a href="javascript:;" onclick="doAction(this);"
                           data-msg="确认设置置顶吗？" data-url="{:url('setField')}" data-params="field=is_top&value=1&theme_id={$vo.theme_id}">
                            <i class="fa fa-close"> </i>
                        </a>
                        {/eq}
                    </td>
                    <td>
                        {eq name="vo.is_recommend" value="1"}
                        <a href="javascript:;" onclick="doAction(this);"
                           data-msg="确认取消推荐吗？" data-url="{:url('setField')}" data-params="field=is_recommend&value=0&theme_id={$vo.theme_id}">
                            <i class="fa fa-check"> </i>
                        </a>
                        {else/}
                        <a href="javascript:;" onclick="doAction(this);"
                           data-msg="确认设置推荐吗？" data-url="{:url('setField')}" data-params="field=is_recommend&value=1&theme_id={$vo.theme_id}">
                            <i class="fa fa-close"> </i>
                        </a>
                        {/eq}
                    </td>
                    <td>
                        {eq name="vo.is_closed" value="1"}
                        <a href="javascript:;" onclick="doAction(this);"
                           data-msg="确认取消关闭吗？" data-url="{:url('setField')}" data-params="field=is_closed&value=0&theme_id={$vo.theme_id}">
                            <i class="fa fa-close"> </i>
                        </a>
                        {else/}
                        <a href="javascript:;" onclick="doAction(this);"
                           data-msg="确认关闭吗？" data-url="{:url('setField')}" data-params="field=is_closed&value=1&theme_id={$vo.theme_id}">
                            <i class="fa fa-check"> </i>
                        </a>
                        {/eq}
                    </td>

                    <td>
                        <a href="javascript:;" onclick="doAction(this);"
                           data-msg="确认操作吗？" data-url="{:url('del')}" data-params="theme_id={$vo.theme_id}">
                            删除
                        </a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            <div class="page-bar">{$list->render()}</div>
        </div>
    </div>
</div>
{/block}
{block name="script"}{/block}